package com.example.birdfriends.service;

import com.example.birdfriends.pojo.hot.HotPost;
import com.example.birdfriends.pojo.post.Post;
import javafx.geometry.Pos;
import org.springframework.validation.beanvalidation.SpringValidatorAdapter;

import java.sql.Timestamp;
import java.util.List;

public interface PostService {
    public int createPost(Post post);
    public boolean compareUid(Long pid, Long frontUid);
    public Post findPostByPid(Long pid);
    public int updatePostByPid(Post post);
    public int deletePostByPid(Long pid);
    public List<Post> queryPostWithLoginInMain(Long uid, Long start, Long lineNumber);  // 查询除当前用户的其他帖子
    public List<Post> findPostsByUid(Long uid);
    public List<Post> queryAllPosts(Long start, Long lineNumber);  // 查询所有帖子
    public int setImagesAndVideos(Post post);
    public List<Post> findPostsByThemeNotLogin(String theme, Long start, Long lineNumber);
    public Long countPostByThemeNotLogin(String theme);
    public List<Post> findPostsByThemeWithLogin(String theme, Long uid, Long start, Long lineNumber);
    public Long countPostByThemeWithLogin(String theme, Long uid);
    public List<Post> findPostsByTitleOrContent(String title, String content);
    public Long countPostsNotLogin();  // 非登录状态下的
    public Long countPostsWithLogin(Long curLoginUid);
    public List<Long> findPostIdsOrderByPid();
    public List<Long> findPostIdsWithLogin(Long curLoginUid);
    public List<Post> findHotPostIdList();
    public List<Post> findHotPostIdListInToday(Timestamp curTime);
}
